<?php

namespace App\Http\Requests\Api\Admin;

use App\Http\Requests\Api\FormRequest;

class AdminUserResetPwRequest extends FormRequest
{
    public function rules()
    {
        return [
            'user_id' => ['required', 'numeric'],
            'newPassword' => ['required', 'max:16', 'min:6'],
        ];
    }

    public function messages()
    {
        return [
            'required' => ':attribute不能为空',
            'numeric' => ':attribute只能是整数',
            'password.max' => '密码长度不能超过16个字符',
            'password.min' => '密码长度不能小于6个字符',
        ];
    }

}
